home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / samba.idb / usr / samba / src / packaging / Solaris / pkg-specs / postremove.z / postremove
Encoding:
Text File  |  1998-10-28  |  883 b   |  31 lines

  1. #!/bin/sh
  2. # remove samba
  3.  
  4. nawk '/^netbios-[ns]*[     ]/ {next}
  5. {print} ' \
  6.     ${PKG_INSTALL_ROOT}/etc/inet/services > /tmp/services.$$ && \
  7.     mv -f /tmp/services.$$ ${PKG_INSTALL_ROOT}/etc/inet/services &&
  8. \
  9.     chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/services && \
  10.     echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/services"
  11.  
  12. nawk '/samba.*mbd[     ]/ { next }
  13. {print} ' \
  14.         ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf > /tmp/inetd.conf.$$ &&
  15. \
  16.         mv -f /tmp/inetd.conf.$$ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf
  17. && \
  18.     chmod 644  ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf && \
  19.         echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf"
  20.  
  21. echo "Removed samba service from ${PKG_INSTALL_ROOT:-/}" 
  22.  
  23. inetpid=`/bin/ps -ef | awk '/ \/usr\/sbin\/inetd / { print $2 } '`
  24. if [ "X$inetpid" = "X" ]; then
  25.    echo "inetd not running"
  26. else
  27.    echo "Restarting inetd($inetpid)"
  28.    kill -HUP $inetpid
  29. fi
  30.  
  31.